package com.htgd.gardenexpo.service.impl;

import com.htgd.gardenexpo.entity.GeConTheaterPlanMovie;
import com.htgd.gardenexpo.dao.GeConTheaterPlanMovieMapper;
import com.htgd.gardenexpo.service.GeConTheaterPlanMovieService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 计划和影片关系 服务实现类
 * </p>
 *
 * @author author
 * @since 2024-09-09
 */
@Service
public class GeConTheaterPlanMovieServiceImpl extends ServiceImpl<GeConTheaterPlanMovieMapper, GeConTheaterPlanMovie> implements GeConTheaterPlanMovieService {

    @Override
    public GeConTheaterPlanMovie getByMovieAndPlan(String movieId, String id) {
        return lambdaQuery().eq(GeConTheaterPlanMovie::getMovieId,movieId)
                .eq(GeConTheaterPlanMovie::getPlanId,id)
                .one();
    }

    @Override
    public List<GeConTheaterPlanMovie> getByPlan(String id) {
        return lambdaQuery().eq(GeConTheaterPlanMovie::getPlanId,id)
                .list();
    }
}
